//
//  main.cpp
//  Mir_2
//
//  Created by 종헌 백 on 12. 1. 10..
//  Copyright (c) 2012년 backssi1@naver.com. All rights reserved.
//

#include <iostream>

using namespace std;

float function1(float a);
float function2(float a);
float function3(float a);

int main ()
{
    int n;
    float r,a[3];
    
    cout << "Input your number : ";
    cin >> r;
    
    cout << "Which Number? : ";
    cin >> n;
    
    switch(n)
    {
        case 1:
        {
            a[0] = function1(r);
            cout<<a[0]<<endl;
        break;
        }
        case 2:
        {
            a[1] = function2(r);
            cout<<a[1]<<endl;
        break;
        }
        case 3:
        {
            a[2] = function3(r);
            cout<<a[2]<<endl;
        break;
        }
    }
    return 0;
}


float function1(float a)
{
    return a/2;
}
float function2(float a)
{
    return 3.141592 * a;
}
float function3(float a)
{
    return 3.141592 * a * a;
}